Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grabbing Report field in Macro 1

Status
Not open for further replies.

FossRock

Programmer
Joined
Jun 13, 2003
Messages
3
Location
US
I am trying to grab a value from the BO report to use as the filename that I am saving my report under. For example if the report had a field called "invoice number" with a value of 11111 then my file would be 11111.pdf. I have everything but the command that returns the value of a field.
 
If Invoice Number is a variable in the report catch hold off that Variable using the Macro and use it for saving the file appropriately.

Sri
 
I am using a macro. I need to be able to grab the values of specific fields to use in the macro to save the report as.
 
Are you displaying details of only one invoice number in the report. in that case i would suggest you make a variable max_invoicenumber with the following formula
=max(Invoice Number)

then in the macro

dim var as DocumentVariable

var = ActitiveDocument.DocumentVariable.item(n).value

in your case n is the variable number in the report. To find this number go to the add variable dialog box and count from the top to bottom until u reach your variable.

this will give the value inside the variable
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top