Jump to content


Photo
- - - - -

Problem with Global Report in VIP


7 replies to this topic

#1 Ivan Gomez

Ivan Gomez

    Member

  • Members
  • PipPip
  • 20 posts

Posted 07 August 2007 - 09:33 AM

Hello to everybody...

I'm working with VIP version 5.5. Now I'm trying to do a Global Report into a physical file with delimited output (';'), with a master - detail structure, ex:

Master Field1; Master Field2; Master Field3
Detail Field1; Detail Field2; Detail Field3
Detail Field1; Detail Field2; Detail Field3
Master Field1; MasterField2;Master Field3
Detail Field1; Detail Field2 Detail Field3

.. and so on

My problem is that I don't know how to make PROIV change line after one record has been written, and I got files like:
Master Field1; Master Field2; Master Field3; Detail Field1; Detail Field2; Detail Field3; Detail Field1 Detail Field2; Detail Field3
Master Field1; Master Field2; Master Field3; Detail Field1; Detail Field2; Detail Field3

I have done two Report Cycles, Detail Cycle is child of the Master Cycle. Am I doing something Wrong? Do I have to make something to explicit the change of line??? Thank you in advance for your help...

#2 Chris Mackenzie

Chris Mackenzie

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 368 posts
  • Gender:Male
  • Location:Bristol, United Kingdom

Posted 07 August 2007 - 01:19 PM

Hello to everybody...

I'm working with VIP version 5.5. Now I'm trying to do a Global Report into a physical file with delimited output (';'), with a master - detail structure, ex:

Master Field1; Master Field2; Master Field3
Detail Field1; Detail Field2; Detail Field3
Detail Field1; Detail Field2; Detail Field3
Master Field1; MasterField2;Master Field3
Detail Field1; Detail Field2 Detail Field3

.. and so on

My problem is that I don't know how to make PROIV change line after one record has been written, and I got files like:
Master Field1; Master Field2; Master Field3; Detail Field1; Detail Field2; Detail Field3; Detail Field1 Detail Field2; Detail Field3
Master Field1; Master Field2; Master Field3; Detail Field1; Detail Field2; Detail Field3

I have done two Report Cycles, Detail Cycle is child of the Master Cycle. Am I doing something Wrong? Do I have to make something to explicit the change of line??? Thank you in advance for your help...



If your external file type is set to 'BIN' change it to 'SEQ'

then one lscall to write one line:
Master Field1; Master Field2; Master Field3

then another LSCALL to write next line
Detail Field1; Detail Field2; Detail Field3

etc etc
The content and views expressed in this message are those
of the poster and do not represent those of any organisation.

#3 Ivan Gomez

Ivan Gomez

    Member

  • Members
  • PipPip
  • 20 posts

Posted 07 August 2007 - 02:10 PM

If your external file type is set to 'BIN' change it to 'SEQ'

then one lscall to write one line:
Master Field1; Master Field2; Master Field3

then another LSCALL to write next line
Detail Field1; Detail Field2; Detail Field3

etc etc


Hi!

I specified the file with the command: SET_RPTOPT($$DIR_FILE,'8',''), I tried making different LSCALL, but only change line when Master change record...
Thanks for your answer...

#4 Chris Mackenzie

Chris Mackenzie

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 368 posts
  • Gender:Male
  • Location:Bristol, United Kingdom

Posted 07 August 2007 - 03:08 PM

Hi!

I specified the file with the command: SET_RPTOPT($DIR_FILE,'8',''), I tried making different LSCALL, but only change line when Master change record...
Thanks for your answer...



Ah - I see. sorry. Well if what you want is to produce a seq file as described
then drop the report. Use an update function instead. Create a Pro-iv
file def of type 'SEQ' with a long enough recordlength for your string of
fields. Then compose each line by reading your input files in the update
function and then LSCALL to add one record to the file at a time as required.

It may be possible to achieve what you want using pro-iv report but
it would be trickier to get right. Probably you would create a report header
composed of your master fields and use that as the associated header
for your detail cycle. And in the detail cycle you could print out the detail
fields. But I think the UPDATE function is what you're after.
The content and views expressed in this message are those
of the poster and do not represent those of any organisation.

#5 DARREN

DARREN

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 396 posts
  • Gender:Male
  • Location:Florida,USA

Posted 07 August 2007 - 04:11 PM

Or you could always do it as an XML report
Things should be made as simple as possible, but not simpler

#6 Ivan Gomez

Ivan Gomez

    Member

  • Members
  • PipPip
  • 20 posts

Posted 08 August 2007 - 08:04 AM

Ah - I see. sorry. Well if what you want is to produce a seq file as described
then drop the report. Use an update function instead. Create a Pro-iv
file def of type 'SEQ' with a long enough recordlength for your string of
fields. Then compose each line by reading your input files in the update
function and then LSCALL to add one record to the file at a time as required.

It may be possible to achieve what you want using pro-iv report but
it would be trickier to get right. Probably you would create a report header
composed of your master fields and use that as the associated header
for your detail cycle. And in the detail cycle you could print out the detail
fields. But I think the UPDATE function is what you're after.


This solution works fine!!!, thank you very much for your answer...!!! Now my, problem is how to explicit the structure to EXCEL with DDE commands in order to able the user to contract and expand the detail nodes...

#7 DARREN

DARREN

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 396 posts
  • Gender:Male
  • Location:Florida,USA

Posted 08 August 2007 - 06:46 PM

Ah - I see. sorry. Well if what you want is to produce a seq file as described
then drop the report. Use an update function instead. Create a Pro-iv
file def of type 'SEQ' with a long enough recordlength for your string of
fields. Then compose each line by reading your input files in the update
function and then LSCALL to add one record to the file at a time as required.

It may be possible to achieve what you want using pro-iv report but
it would be trickier to get right. Probably you would create a report header
composed of your master fields and use that as the associated header
for your detail cycle. And in the detail cycle you could print out the detail
fields. But I think the UPDATE function is what you're after.


This solution works fine!!!, thank you very much for your answer...!!! Now my, problem is how to explicit the structure to EXCEL with DDE commands in order to able the user to contract and expand the detail nodes...



Please find attached the DDE Instruction Book for Excel from MS

Attached Files


Things should be made as simple as possible, but not simpler

#8 andykay

andykay

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 204 posts
  • Gender:Male
  • Location:Cyberspace...looking for work

Posted 09 August 2007 - 05:28 PM

This solution works fine!!!, thank you very much for your answer...!!! Now my, problem is how to explicit the structure to EXCEL with DDE commands in order to able the user to contract and expand the detail nodes...


Yeah,

This solution works fine if all you want is an ordinary, plain looking, with zero professionalism spreadsheet :x: .

But if you want to add bells and whistles to expand and contract the spreadsheet, as you stated, then you're travelling down the wrong path because the answers you have received so far, barring DARRENs attachment, have been geared towards a NEWBIE 101 course in report writing (w00t) .

ProIV simply cannot do
what you want your final XLS to look like...Only Excel can do that through DDE commands issued from ProIV.

While I will not write the report for you, I will nudge you in the direction you should head towards. You need to use DDE to write your Spreadsheet. There are plenty of good examples of how to issue DDE commands, from ProIV, here on the RC. Examples like how to open Excel, How to Save your work, and how to get your data from ProIV to your Excel spreadsheet.


Once you understand the timing of where and how to issue these commands, you'll be miles ahead of where you are today with using a delimited file.


Good Luck in your endevours. B)

AK

Edited by andykay, 09 August 2007 - 05:31 PM.

THE LIGHT AT THE END OF THE TUNNEL IS THE HEADLAMP OF THE TRAIN THAT'S ABOUT TO HIT YOU!!!



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users