1,2: Make a report, eventually choose print to file.
See almost every report/RunbaseReport Class
in Axapta, try class CustReport_Cust. If
You need other than the given file formats
(ASCII,RTF,HTML,PDF), e.g. FixedLength,
You can see how it is done in class
IntrastatDisk.
3: Your Job runs very fine on my application,
there must be some kind of a problem with
the return value of the
dictionary.configurationKeyCnt(). Try a different
value in the for-loop to see if this works
without stack errors, then this is the problem.
Unfortunately I don't have the solution!!
4: dictConfigurationKey.parentConfigurationKeyId()
works fine as well. If You want to loop from
bottom parentkey to top parentkey (or the
opposite), I guess that You have to store the
results from Your job, and sort them by
parentkeyId. You could use a new temporary table
or just store the Ids in an array:
int ConfigurationKeyId[];
;
ConfigurationKeyId
[dictConfigurationKey.parentConfigurationKeyId)]
=
dictionary.configurationKeyCnt2Id(cntCfgKey);
Of course a lot of childs are pointing to the
same parent,so if You need to see all the childs,
this isn't a good solution. Then You must
consider
using the temporary tabel.
No matter what solution You choose, You can run
through a sorted list afterwards and print/export
the details You need.
Best Regards
Steffan Engholm
--- Danny Gaethofs <[EMAIL PROTECTED]> wrote:
> Dear all,
>
> I am trying to generate an overview of the
> configuration keys and their parents in the system.
> I am targetting at displaying which of the keys are
> enable and which are not.
> I want to have the output exported to a fle or else
> printed.
>
> I have 4 main questions:
>
> 1.Can someone explain me how I can export the output
> or indicate where I can find an example.
>
> 2. How can I print it?
>
> 3. The most difficult question I have is related to
> the Job I created. I have defined an Object
> parConfigurationKey based on the
> DictConfigurationKey. See below in the Job.
> When I compile the job there are no errors. When I
> run the Job I get the error :
> Error.
> Error executing code: DictConfigurationKey object
> not initalized.
>
> Stack trace:
> \Classes\DictConfigurationKey\name
> \Jobs\..... line 39
>
> What I am trying to accomplish is printing the name
> of the parentConfigurationKey for each
> ConfigurationKey.
>
> 4. I also need to built in somekind of a loop that
> prints the parents until it arrives at parent id 0.
> How can I does so, considering the above mentioned
> problems.
>
> Regards,
> Danny
>
>
>
> static void QryConfigurationKeys(Args _args)
> {
> Dictionary dictionary = new Dictionary();
> ConfigurationKeySet configurationKeySet = new
> ConfigurationKeySet();
> DictConfigurationKey dictConfigurationKey;
> DictConfigurationKey parConfigurationKey;
>
> int cntCfgKey, cntCfgKeySet;
>
> print "number of configuration keys:
> "+int2str(dictionary.configurationKeyCnt());
>
> for (cntCfgKey=1; cntCfgKey<=
> dictionary.configurationKeyCnt();cntCfgKey++)
> {
> dictConfigurationKey = new
>
DictConfigurationKey(dictionary.configurationKeyCnt2Id(cntCfgKey));
>
> if (dictConfigurationKey.name() like "*BOM*")
> {
>
Int2Str(dictionary.configurationKeyCnt2Id(cntCfgKey))
> + " "
> + dictConfigurationKey.name()
> + " "
> + Enum2Str(dictConfigurationKey.enabled())
> + " "
> + dictConfigurationKey.label()
> + " "
> +
>
Int2Str(dictConfigurationKey.parentConfigurationKeyId());
>
>
> /*
> parConfigurationKey = new
>
DictConfigurationKey(dictConfigurationKey.parentConfigurationKeyId());
>
> print parConfigurationKey.name();
> */
>
> }
> }
> }
>
>
>
> Do you Yahoo!?
> Yahoo! Finance Tax Center - File online. File on
time.
__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html
| Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

